<!--

/*
* Copyright (C) 2005-2013 University of Sydney
*
* Licensed under the GNU License, Version 3.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.gnu.org/licenses/gpl-3.0.txt
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/

/**
* brief description of file
*
* @author      Tom Murtagh
* @author      Kim Jackson
* @author      Ian Johnson   <ian.johnson@sydney.edu.au>
* @author      Stephen White   <stephen.white@sydney.edu.au>
* @author      Artem Osmakov   <artem.osmakov@sydney.edu.au>
* @copyright   (C) 2005-2013 University of Sydney
* @link        http://Sydney.edu.au/Heurist
* @version     3.1.0
* @license     http://www.gnu.org/licenses/gpl-3.0.txt GNU License 3.0
* @package     Heurist academic knowledge management system
* @subpackage  !!!subpackagename for file such as Administration, Search, Edit, Application, Library
*/

-->
<!--

/**
* editRecStructure.html
*
* manages the structure of given rectype, edit properties for view  (width, label, order, tooltip)
*  for fields and allows to preview the record's entry form on-fly,
* invokes selectDetailType.html - to add new detailtype into record structure
*
* 2011-03-15
* @autor: Artem Osmakov
*
* @copyright (C) 2005-2010 University of Sydney Digital Innovation Unit.
* @link: http://HeuristScholar.org
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @package Heurist academic knowledge management system
* @todo  deletion
**/

-->
<html>
	<head>
		<title>RECORD STRUCTURE</title>

		<link rel="icon" href="../../favicon.ico" type="image/x-icon">
		<link rel="shortcut icon" href="../../favicon.ico" type="image/x-icon">

		<!-- YUI -->
		<link rel="stylesheet" type="text/css" href="../../external/yui/2.8.2r1/build/fonts/fonts-min.css" />
		<link rel="stylesheet" type="text/css" href="../../external/yui/2.8.2r1/build/treeview/assets/skins/sam/treeview.css" />

		<script type="text/javascript" src="../../external/yui/2.8.2r1/build/yahoo-dom-event/yahoo-dom-event.js"></script>
		<script type="text/javascript" src="../../external/yui/2.8.2r1/build/element/element-min.js"></script>

		<script type="text/javascript" src="../../external/yui/2.8.2r1/build/yahoo/yahoo-min.js"></script>
		<script type="text/javascript" src="../../external/yui/2.8.2r1/build/json/json-min.js"></script>

		<!-- link rel="stylesheet" type="text/css" href="../../external/yui/2.8.2r1/build/reset-fonts-grids/reset-fonts-grids.css"/ -->
		<!-- Skin CSS files resize.css must load before layout.css -->
		<link rel="stylesheet" type="text/css" href="../../external/yui/2.8.2r1/build/assets/skins/sam/resize.css">
		<link rel="stylesheet" type="text/css" href="../../external/yui/2.8.2r1/build/assets/skins/sam/layout.css">
		<!-- Utility Dependencies -->
		<script src="../../external/yui/2.8.2r1/build/yahoo-dom-event/yahoo-dom-event.js"></script>
		<script src="../../external/yui/2.8.2r1/build/dragdrop/dragdrop-min.js"></script>
		<script src="../../external/yui/2.8.2r1/build/element/element-min.js"></script>
		<!-- Optional Animation Support-->
		<script src="../../external/yui/2.8.2r1/build/animation/animation-min.js"></script>
		<!-- Optional Resize Support -->
		<script src="../../external/yui/2.8.2r1/build/resize/resize-min.js"></script>
		<!-- Source file for the Layout Manager
		<script src="../../external/yui/2.8.2r1/build/layout/layout-min.js"></script>
		-->

		<!-- DATATABLE DEFS -->
		<link type="text/css" rel="stylesheet" href="../../external/yui/2.8.2r1/build/datatable/assets/skins/sam/datatable.css">
		<!-- datatable Dependencies -->
		<script type="text/javascript" src="../../external/yui/2.8.2r1/build/datasource/datasource-min.js"></script>
		<!-- OPTIONAL: Drag Drop (enables resizeable or reorderable columns) -->
		<script type="text/javascript" src="../../external/yui/2.8.2r1/build/dragdrop/dragdrop-min.js"></script>
		<!-- Source files -->
		<script type="text/javascript" src="../../external/yui/2.8.2r1/build/datatable/datatable-min.js"></script>
		<!-- END DATATABLE DEFS-->

		<!-- PAGINATOR
		<link rel="stylesheet" type="text/css" href="../../external/yui/2.8.2r1/build/paginator/assets/skins/sam/paginator.css">
		<script type="text/javascript" src="../../external/yui/2.8.2r1/build/paginator/paginator-min.js"></script>
		 END PAGINATOR -->

		<link rel="stylesheet" type="text/css" href="../../external/yui/2.8.2r1/samples/yui-dt-expandable.css"/>
		<script type="text/javascript" src="../../external/yui/2.8.2r1/samples/yui-dt-expandable.js"></script>
		<!-- END YUI -->

		<script type="text/javascript" src="../../external/jquery/jquery.js"></script>

        <link rel="stylesheet" type="text/css" href="../../common/css/global.css">
		<link rel="stylesheet" type="text/css" href="../../common/css/edit.css">
    	<link rel="stylesheet" type="text/css" href="../../common/css/admin.css">
		<style type="text/css">
			.input-row div.input-header-cell {vertical-align:baseline; width:100px}
			.dtyField {
				padding-bottom: 3px;
				padding-top: 3px;
				display: block;
			}
			.dtyLabel {
				display: inline-block;
				width: 150px;
				text-align: right;
				padding-right: 3px;
			}
			.dtyValue {
				display: inline-block;
			}
			/*.yui-dt table
			{
				width: 590;
				max-width: 590;
			}*/
			.yui-dt-highlighted {
    			background-color: #000;
    			color: #FFF;
			}
			.tooltip {
				position:absolute;
				z-index:999;
				left:-9999px;
				top:0px;
				background-color:#dedede;
				padding:5px;
				border:1px solid #fff;
				min-width:300;
				min-height:300;
			}


.depth0 {
	margin-left: 0px;
}
.depth1 {
	margin-left: 10px;
}
.depth2 {
	margin-left: 20px;
}
.depth3 {
	margin-left: 30px;
}
.depth4 {
	margin-left: 40px;
}
.depth5 {
	margin-left: 50px;
}
.depth6 {
	margin-left: 60px;
}
.depth7 {
	margin-left: 70px;
}

.termHeader {
	font-weight: bold;
	color: black;
}
.dtyName {
	text-align:left;
	padding-left: 10px;
	padding-bottom: 3px;
	padding-top: 3px;
	font-weight: 200;
}

/* grey rows in datatable */
.yui-skin-sam .yui-dt tr.gray,
.yui-skin-sam .yui-dt tr.gray td.yui-dt-asc,
.yui-skin-sam .yui-dt tr.gray td.yui-dt-desc,
.yui-skin-sam .yui-dt tr.gray td.yui-dt-asc,
.yui-skin-sam .yui-dt tr.gray td.yui-dt-desc {
	color: #aaaaaa;
}

		</style>

	</head>

	<body class="popup yui-skin-sam" style="overflow: auto;">
		<h2 id="recordTitle" style="margin:10px 0"></h2>
        <div id="page-inner" style="top:50px; bottom:40px;">
		<script type="text/javascript" src="../../common/js/utilsLoad.js"></script>
		<script src="../../common/php/displayPreferences.php"></script>
		<script src="../../common/php/getMagicNumbers.php"></script>
		<script src="../../common/php/loadCommonInfo.php"></script>

		<!-- script type="text/javascript" src="../../records/edit/editRecord.js"></script -->
		<script type="text/javascript" src="../../records/edit/relationshipsObjectLibrary.js"></script>


		<script type="text/javascript" src="editRecStructure.js"></script>
		<script type="text/javascript" src="selectTerms.js"></script>
		<script type="text/javascript" src="selectRectype.js"></script>
		<script type="text/javascript" src="../../common/js/utilsUI.js"></script>



<!--  class="yui-navset yui-navset-top"  -->
		<div id="modelTabs" style="margin:auto;text-align:left;">
		</div>
		</div>
		<div style="bottom:10px;left:10px; right:10px;text-align:left; position:absolute;">
        	<span style="float:left">
            We recommend using an appropriate existing field (Insert Field button above) if one is already defined:
             <input type="button" value="Define new field type" title="Create a completely new field type - it is preferable to use an exsiting type (choose with Insert Field button above) before creating a new field type." onClick="onDefineNewType()"/>
             <br>Click row to edit field specifications. Drag arrows at left to change the order in the form.
            </span>

            <span style="float:right; text-align:right">
			<!--<input type="button" value="Back to list of record types" onClick="{window.history.back();}"/>-->
            <!-- input type="button" value="Preview" onClick="editStructure.initPreview()"/ -->
            <input type="button" value="Done" onClick="editStructure.closeWin();"/>
            </span>
		</div>

		<script  type="text/javascript">
				//
				//  starts initialization on load completion of this window
				//
				YAHOO.util.Event.addListener(window, "load", function(){  editStructure = new  EditRecStructure(); });
		</script>
	</body>
</html>